package com.codeworker.it.demo;

import com.codeworker.it.demo.handler.S3Handler;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import javax.annotation.Resource;

/**
 * 启动类
 *
 * @author xin
 * @since 2023-07-17
 */
@SpringBootApplication
public class Application {
    @Resource
    private S3Handler defaultS3Client;

    @Resource
    private S3Handler rmsS3Client;

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Bean
    public CommandLineRunner runner() {
        return args -> {
            System.out.println(defaultS3Client);
            System.out.println(rmsS3Client);
        };
    }

}
